//
//  GGZFBOptionNomarlCell.m
//  Gunterapple
//
//  Created by 热带雨林 on 2020/4/3.
//  Copyright © 2020 热带雨林. All rights reserved.
//

#import "GGZFBOptionNomarlCell.h"
#import "GGAddtion.h"
@interface GGZFBOptionNomarlCell ()
@property (nonatomic, weak) UILabel *priceLab;
@property (nonatomic, weak) UIImageView *img;
@property (nonatomic, weak) UILabel *titleLab;
@end
@implementation GGZFBOptionNomarlCell
- (instancetype)initWithFrame:(CGRect)frame{
    if(self = [super initWithFrame:frame]){
        [self setUI];
    }
    return self;
}

- (void)setUI{
    UILabel *priceLab = [[UILabel alloc]init];
    self.priceLab = priceLab;
    self.priceLab.text = @"7,465,312.98元";
    self.priceLab.font = [UIFont fontWithName:@"Helvetica-Bold" size:20];
    [self.priceLab sizeToFit];
    [self.contentView addSubview:priceLab];
    UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectZero];
    self.img = img;
    self.img.image = [UIImage imageNamed:@"alipay_msp_arrow_right"];
    [self.contentView addSubview:self.img];
    UILabel *titleLab = [[UILabel alloc]init];
    self.titleLab = titleLab;
    self.titleLab.font = [UIFont systemFontOfSize:15];
    [self.titleLab sizeToFit];
    self.titleLab.text = @"资产保护中...";
    [self.contentView addSubview:titleLab];
    
    [self.priceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).and.offset(8); //增加可读性
        make.centerY.equalTo(self.contentView);
        make.width.mas_lessThanOrEqualTo(200);
//        make.width.mas_greaterThanOrEqualTo(500);
//        make.width.lessThanOrEqualTo(@200);
//        make.width.greaterThanOrEqualTo(@500);
    }];
    
    
    [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView.mas_right).with.offset(-8);//增加可读性
        make.size.mas_equalTo(CGSizeMake(10, 20));
    }];
    
    
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.img.mas_left).offset(-8);
        make.width.mas_lessThanOrEqualTo(200);
    }];
    
    
}
@end
